wayland: emit GDK_SELECTION_CLEAR on owner changes
authorChristophe Fergeau <cfergeau@redhat.com>
Tue, 28 Nov 2017 16:44:06 +0000 (17:44 +0100)
committerChristophe Fergeau <cfergeau@redhat.com>
Wed, 29 Nov 2017 10:21:32 +0000 (11:21 +0100)
commit8af29e375643fef3f2ba4aa8368050afd86a018e
tree92c1d25b84220970d11901fbc9fe53ecfe94211f
parentbeb2caacb96661069cb79e9c076f6f6d91527214
wayland: emit GDK_SELECTION_CLEAR on owner changes

The wayland backend currently never emits GDK_SELECTION_CLEAR events.
GtkClipboard uses this signal in order to clear the clipboard owner when
the selection is set to something outside the application.
This commit ensures the wayland backend emits GDK_SELECTION_CLEAR before
setting the clipboard owner to NULL, as this means we lost the
selection.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=790031
gdk/wayland/gdkselection-wayland.c